﻿<%@ Page Title="Kids Church Report Summary" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MyLocalChurch.KidsChurch.Reports.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Kids Church Report Summary</h2>
    <table>
        <thead>
            <tr>
                <th>Service</th>
                <th>Toddler</th>
                <th>Pre-School</th>
                <th>Primary</th>
                <th>Pre-Teen</th>
                <th>Total</th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <td>Total</td>
                <td>
                    <asp:Label ID="lblTotalToddlerCheckedOut" runat="server"></asp:Label>
                    (<asp:Label ID="lblTotalToddler" runat="server"></asp:Label>)
                </td>
                <td>
                    <asp:Label ID="lblTotalPreSchoolCheckedOut" runat="server"></asp:Label>
                    (<asp:Label ID="lblTotalPreSchool" runat="server"></asp:Label>)
                </td>
                <td>
                    <asp:Label ID="lblTotalPrimaryCheckedOut" runat="server"></asp:Label>
                    (<asp:Label ID="lblTotalPrimary" runat="server"></asp:Label>)
                </td>
                <td>
                    <asp:Label ID="lblTotalPreTeenCheckedOut" runat="server"></asp:Label>
                    (<asp:Label ID="lblTotalPreTeen" runat="server"></asp:Label>)
                </td>
                <td>
                    <asp:Label ID="lblGrandTotalCheckedOut" runat="server"></asp:Label>
                    (<asp:Label ID="lblGrandTotal" runat="server"></asp:Label>)
                </td>
            </tr>
        </tfoot>
        <tbody>
            <asp:Repeater ID="rptSummary" runat="server">
                <ItemTemplate>
                    <tr>
                        <td><%# DataBinder.Eval(Container.DataItem, "ChurchService") %></td>
                        <td>
                            <a href="ReportDetails.aspx?ChurchServiceId=<%# DataBinder.Eval(Container.DataItem, "ChurchServiceId") %>&Category=Toddler">
                                <%# DataBinder.Eval(Container.DataItem, "TotalToddlerCheckedOut") %>
                                (<%# DataBinder.Eval(Container.DataItem, "TotalToddler") %>)
                            </a>
                        </td>
                        <td>
                            <a href="ReportDetails.aspx?ChurchServiceId=<%# DataBinder.Eval(Container.DataItem, "ChurchServiceId") %>&Category=PreSchool">
                                <%# DataBinder.Eval(Container.DataItem, "TotalPreSchoolCheckedOut") %>
                                (<%# DataBinder.Eval(Container.DataItem, "TotalPreSchool") %>)
                            </a>
                        </td>
                        <td>
                            <a href="ReportDetails.aspx?ChurchServiceId=<%# DataBinder.Eval(Container.DataItem, "ChurchServiceId") %>&Category=Primary">
                                <%# DataBinder.Eval(Container.DataItem, "TotalPrimaryCheckedOut") %>
                                (<%# DataBinder.Eval(Container.DataItem, "TotalPrimary") %>)
                            </a>
                        </td>
                        <td>
                            <a href="ReportDetails.aspx?ChurchServiceId=<%# DataBinder.Eval(Container.DataItem, "ChurchServiceId") %>&Category=PreTeen">
                                <%# DataBinder.Eval(Container.DataItem, "TotalPreTeenCheckedOut") %>
                                (<%# DataBinder.Eval(Container.DataItem, "TotalPreTeen") %>)
                            </a>
                        </td>
                        <td>
                            <%# DataBinder.Eval(Container.DataItem, "SubTotalCheckedOut") %>
                            (<%# DataBinder.Eval(Container.DataItem, "SubTotal") %>)
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </tbody>
    </table>
    <p>
        * Numbers within () includes the kids who have not yet checked out.
    </p>
</asp:Content>
